<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ page import="schronisko.*,Users.*,java.sql.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Ostatnie transakcje</title>
<style>
body {
background: #d0f0f6;
}
#customers
{
font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
border-collapse:collapse;
}
#customers td, #customers th 
{
font-size:1em;
border:1px solid #98bf21;
padding:3px 7px 2px 7px;
}
#customers th 
{
font-size:1.1em;
text-align:left;
padding-top:5px;
padding-bottom:4px;
background-color:#A7C942;
color:#ffffff;
}
#customers tr.alt td 
{
color:#000000;
background-color:#EAF2D3;
}
</style>
</head>
<body>
<a href = "../chef/transactions.jsp"> Powrot do panelu</a><br><br>
<center>
<table id="customers">
<tr>
<th>ID</th>
<th width=150>Kwota</th>
<th width=400>Tytul</th>
<th width=250>Odbiorca</th>
<th width=150>Data</th>
</tr>
<%
response.setContentType("text/html");
ResultSet r = (ResultSet)session.getAttribute("transactions");
int i = 1;
while(r.next()){
	if (i%2 == 0)
	out.println("<tr><td>"+ r.getInt(1) +"</td><td>"+ r.getFloat(3) +"</td><td>"+ r.getString(4) +"</td><td>"+ r.getString(2) +"</td><td>"+ r.getDate(5) +"</td></tr>");
	else 
		out.println("<tr class='alt'><td>"+ r.getInt(1) +"</td><td>"+ r.getFloat(3) +"</td><td>"+ r.getString(4) +"</td><td>"+ r.getString(2) +"</td><td>"+ r.getDate(5) +"</td></tr>");
	i++;
}
%>
</table>
</center>
</body>
</html>